package com.jic.member.service;

import com.jic.common.base.vo.RestResult;
import com.jic.member.entity.TripBranchNodeEntity;
import com.jic.member.request.TripBranchNodeEntityRequest;
import com.jic.member.request.TripBranchNodeIdAndTemplateCodeRequest;
import com.jic.member.request.TripBranchNodeIdRequest;
import com.jic.member.response.TripBranchNodeDetailResponse;

/**
 * @author wwb
 * @date: 2020/6/5
 */

public interface TripBranchNodeService {

    /**
     * 编辑保存节点
     */
    RestResult<Long> updateBranchNode(TripBranchNodeEntityRequest tripBranchNodeEntity);

    RestResult<Boolean> delBranchNode(TripBranchNodeIdAndTemplateCodeRequest tripBranchNodeIdRequest);
    /*
     * 核销成功
     * @param node
     * @param thirdUserId
     */
    void exeCheckSellTrue(TripBranchNodeEntity node, String thirdUserId);

    /**
     * 核销失败，所有用户统一处理
     * @param node
     */
    void exeCheckSellFalse(TripBranchNodeEntity node);

    RestResult<TripBranchNodeDetailResponse> getBranchNodeDetail(TripBranchNodeIdRequest tripBranchNodeIdRequest);

    /**
     * 校验是否用户组是否可删除
     * @param userGroupId
     * @return
     */
    Boolean checkUserGroup(Long userGroupId);


    void deleteNodeTopLeftByTripId(Long tripId);

}
